<template>
  <div class="app">
    <a-card class="top">
      <a-row style="margin-bottom:10px">
        <a-col :span="24">
          <a-form layout="inline" :form="form" @submit="handleSubmit">
            <a-form-item label="图案编号">
              <a-input placeholder="请输入图案编号" v-model="patternCodeSearch" allow-clear></a-input>
            </a-form-item>
            <a-form-item label="图案名称">
              <a-input placeholder="请输入图案名称" v-model="patternName" allow-clear></a-input>
            </a-form-item>
            <a-form-item label="面料编号">
              <a-input placeholder="请输入面料编号" v-model="fabricCode" allow-clear></a-input>
            </a-form-item>
            <a-form-item label="设计师名字">
              <a-input placeholder="请输入设计师名字" v-model="designerUserName" allow-clear></a-input>
            </a-form-item>
            <a-form-item>
              <a-button type="primary" html-type="submit">搜索</a-button>
              <a-button type="primary" @click="resetForm" style="margin-left:10px">重置</a-button>
              <a-button type="primary" ghost style="margin-left:10px" @click="showHistory">审核历史</a-button>
              <a-button type="primary" ghost style="margin-left:10px" @click="showSubmitInfo">提交记录</a-button>
              <!-- <a-button type="primary" ghost style="margin-left:10px" @click="showHistory(1)">法务审核历史</a-button>
              <a-button type="primary" ghost style="margin-left:10px" @click="showYidun()">易盾审核记录</a-button> -->
            </a-form-item>
          </a-form>
        </a-col>
      </a-row>
    </a-card>
    <div style="margin-top:20px">
      <a-menu v-model="examineStatus" mode="horizontal" id="pattern">
        <a-menu-item key="wait" @click="getList(0, 8)">待审核{{ count1 }} </a-menu-item>
        <a-menu-item key="pass" @click="getList(10, 8)">已通过{{ count2 }} </a-menu-item>
        <a-menu-item key="nopass" @click="getList(20, 8)">未通过{{ count3 }} </a-menu-item>
        <a-menu-item key="tba" @click="getList(40, 8)" v-if="showWait">待定{{ count4 }} </a-menu-item>
      </a-menu>
    </div>

    <a-spin :spinning="spinning">
      <div class="left-button" @click="last" v-show="current >= 2">
        <a-icon type="left" class="icon" />
      </div>
      <div v-show="showAll" style="width:90%;margin:auto;background: #fff;padding: 10px 10px 0;">
        {{ current }} / {{ total }} {{ patternList.code }} <span style="color:#ee0a24">{{ errortip }}</span><span
          style="color:#ee0a24;margin-left: 10px;">{{ errortip1 }}</span><span
          style="color:#ee0a24;margin-left: 10px;">{{ errortip2 }}</span>
      </div>
      <div v-show="showAll" style="display: flex;flex-direction: column;width:90%;margin:auto;">
        <div id="imgs">
          <div class="left">
            <div style="background:#fff;">
              <div style="border-bottom: 1px solid #e8e8e8; width: 100%;padding:10px 0;">
                <a-carousel arrows :infinite="false" ref="varousel" id="ant-carousel" class="exam">
                  <div slot="prevArrow" class="custom-slick-arrow" style="left: 10px;z-index:100">
                    <a-icon type="left-circle" />
                  </div>
                  <div slot="nextArrow" class="custom-slick-arrow" style="right: 10px">
                    <a-icon type="right-circle" />
                  </div>
                  <div v-for="(item, index) in colorList" :key="item.id">
                    <div style="text-align: right;padding: 0 20px 5px;">{{ index + 1 }}/{{ colorLength }}</div>
                    <div
                      style="display:flex;justify-content: space-between; align-items: center; background:#fafafa; width: 100%;padding:10px 0;">
                      <!-- <div
                        @click="goLeft(index)"
                        id="imgicon"
                        v-if="index!=0"
                        style="margin-right:-30px"
                      >
                        <a-icon type="left-circle" />
                      </div> -->

                      <img @click="bigImg(index)" style="-webkit-touch-callout: none; "
                        :style="{ width: '100%', height: '360px', objectFit: 'scale-down', padding: '0 40px' }"
                        onerror="this.src='https://img.bzhz.jnbygroup.com/cloth.png'"
                        :src="item.images.length ? item.images[0].url : 'https://img.bzhz.jnbygroup.com/cloth.png'" />
                      <!-- <div
                        @click="goRight(index)"
                        id="imgicon"
                        v-if="index!=colorLength-1"
                        style="margin-left:-30px"
                      >
                        <a-icon type="right-circle" />
                      </div> -->
                    </div>
                  </div>
                </a-carousel>

              </div>

              <div id="patternText">
                <p>图案名称: {{ patternList.name }}</p>
                <p>平面设计师:{{ patternList.designerUserName }}</p>
                <p>货季:{{ patternList.season }}</p>
                <!-- <p>描述: {{ patternList.remarks }}</p> -->
                <p>面料编号:{{ patternList.fabricCode }}</p>
                <!-- <p>含义: {{ patternList.meaning }}</p> -->
                <!-- 含义: <span v-html="patternList.meaning"></span> -->
                <!-- <p v-if="patternList.source == 1">来源: 原创</p>
                <p v-if="patternList.source == 2">来源: 借鉴</p>
                <p v-if="patternList.source == 3">来源: 出处</p> -->
                <!-- <p>是否有英文: {{ whetherHasEnglish }}</p>
                <p v-if="whetherHasEnglish == '是'">英文原文: {{ patternList.englishOriginal }}</p>
                <p v-if="whetherHasEnglish == '是'">英文解释: {{ patternList.englishExplain }}</p> -->
                <!-- <p>创作过程: {{ patternList.creativeProcess }}</p> -->
                <!-- <p>创作完成时间: {{patternList.creativeCompleteDate}}</p> -->
                <!-- <p>创作完成地点: {{patternList.creativeCompleteLocation}}</p> -->
                <!-- <p>作品首次发表时间: {{patternList.firstPublishDate}}</p> -->
                <!-- <p>首次发表地点: {{patternList.firstPublishLocation}}</p> -->
                <!-- <p>是否有敏感风险: {{ riskFlag }}</p>
                <div v-if="riskFlag == '是'" style="display:flex">敏感风险: <p v-for="(item, index) in risks" :key="index"
                    style="margin-left:5px">{{ item.title }}</p>
                </div> -->
                <div v-if="groupName == '外采组'">
                  <p>供应商名称: {{ detailList.supplyName }}</p>
                  <p>是否涉及特殊工艺: <span v-if="detailList.specialProcess == 1">是</span><span v-else>否</span></p>
                  <p v-if="detailList.specialProcess == 1">供应商是否有专利: <span
                      v-if="detailList.supplyHasPatent == 1">是</span><span v-else>否</span></p>
                  <p v-if="detailList.supplyHasPatent == 1">供应商是否可提供专利证明文件:<span
                      v-if="detailList.supplyHasPatentFile == 1">是</span><span v-else>否</span></p>
                  <p>面料花纹是否供应商原创: <span v-if="detailList.supplyOriginal == 1">是</span><span v-else>否</span></p>
                  <p v-if="detailList.supplyOriginal == 1">供应商是否可提供原创证明文件:<span
                      v-if="detailList.supplyOriginalProve == 1">是</span><span v-else>否</span></p>

                  <p v-if="detailList.supplyOriginal == 0">花纹来源:{{ detailList.figureSource }}</p>
                  <p v-if="detailList.supplyOriginal == 0">供应商是否可提供花纹授权文件:<span
                      v-if="detailList.supplyOriginalAuthorization == 1">是</span><span v-else>否</span></p>
                  花纹灵感说明:<span v-html="detailList.supplyInspiration"></span><br>
                  文件:<p v-for="item, index in detailList.moreFile" :key="index"><a :href="item" target="_blank">{{ item}}</a></p>
                </div>
                <div v-if="groupName == '设计组'">
                  <p>是否合作款: <span v-if="detailList.cooperation == 1">是</span><span v-else>否</span></p>
                  <p v-if="detailList.cooperation == 1">合作文件:</p>
                  <div v-if="detailList.cooperation == 1"><p v-for="item, index in detailList.cooperationContractUrl" :key="index"><a :href="item" target="_blank">{{ item}}</a></p></div>
                  <p>是否有图案: <span v-if="detailList.patternFlag == 1">是</span><span v-else>否</span></p>
                  <p v-if="detailList.patternFlag == 1">图案出处:
                    <span v-if="detailList.patternSource == 10">原创</span>
                    <span v-if="detailList.patternSource == 20">设计灵感借鉴</span>
                    <span v-if="detailList.patternSource == 30">直接使用</span>
                    <span v-if="detailList.patternSource == 40">改动后使用</span>
                  </p>
                  <p v-if="detailList.patternFlag == 1 && detailList.patternSource != 10">图案来源:{{
                    detailList.patternOrigin }}</p>
                  <!-- <p v-if="detailList.patternFlag == 1 && detailList.patternSource != 10">原始图案发表时间:{{
                    detailList.patternOriginPostedTime }}</p>
                  <p v-if="detailList.patternFlag == 1 && detailList.patternSource != 10">原始图案发表方式:{{
                    detailList.patternOriginIssuingWay }}</p>
                  <p v-if="detailList.patternFlag == 1 && detailList.patternSource != 10">原始图案作者:{{
                    detailList.patternOriginAuthor }}</p> -->
                  <p v-if="detailList.patternFlag == 1 && detailList.patternSource != 10">借鉴/原始图案:</p>
                     <div v-if="detailList.patternFlag == 1 && detailList.patternSource != 10"> <p v-for="item, index in detailList.patternOriginUrl" :key="index"><a :href="item" target="_blank">{{ item}}</a></p></div>
                  <p v-if="detailList.patternFlag == 1 && detailList.patternSource != 10">是否有授权:<span
                      v-if="detailList.patternAuthorization == 1">是</span><span v-else>否</span></p>
                  <p
                    v-if="detailList.patternFlag == 1 && detailList.patternSource != 10 && detailList.patternAuthorization == 1">
                    授权文件:</p>
                     <div v-if="detailList.patternFlag == 1 && detailList.patternSource != 10 && detailList.patternAuthorization == 1"> <p v-for="item, index in detailList.patternAuthorizationUrl" :key="index"><a :href="item" target="_blank">{{ item}}</a></p></div>
                  <p v-if="detailList.patternFlag == 1">设计灵感说明:<span v-html="detailList.patternInspiration"></span></p>
                  <p>是否有文字: <span v-if="detailList.wordage == 1">是</span><span v-else>否</span></p>
                  <p v-if="detailList.wordage == 1">语言类型:
                    <span v-if="detailList.languageType == 10">中文</span>
                    <span v-if="detailList.languageType == 20">英文</span>
                    <span v-if="detailList.languageType == 30">法文</span>
                    <span v-if="detailList.languageType == 40">意大利文</span>
                    <span v-if="detailList.languageType == 50">其他</span>
                  </p>
                  <p v-if="detailList.wordage == 1">字体出处:
                    <span v-if="detailList.typefaceSource == 10">原创</span>
                    <span v-if="detailList.typefaceSource == 20">直接使用</span>
                    <span v-if="detailList.typefaceSource == 30">直接使用</span>
                  </p>
                  <p v-if="detailList.wordage == 1 && detailList.typefaceSource != 10">字体类型:{{ detailList.typefaceType }}
                  </p>
                  <p v-if="detailList.wordage == 1 && detailList.typefaceSource != 10">字体原始图:</p>
                   <div v-if="detailList.wordage == 1 && detailList.typefaceSource != 10">   <p v-for="item, index in detailList.typefaceOriginUrl" :key="index"><a :href="item" target="_blank">{{ item}}</a></p></div>
                  <p v-if="detailList.wordage == 1 && detailList.typefaceSource != 10">来源:
                    <span v-if="detailList.typefaceOrigin == 10">免费字体</span>
                    <span v-if="detailList.typefaceOrigin == 20">授权使用</span>
                    <span v-if="detailList.typefaceOrigin == 30">授权使用</span>
                  </p>
                  <p v-if="detailList.wordage == 1 && detailList.typefaceOrigin == 20">字体来源文件:
                  </p>
                  <div v-if="detailList.wordage == 1 && detailList.typefaceOrigin == 20"><p v-for="item, index in detailList.typefaceOriginProveUrl" :key="index"><a :href="item" target="_blank">{{ item}}</a></p></div>

                  <p v-if="detailList.wordage == 1 && detailList.typefaceOrigin == 30">字体来源其他说明:{{
                    detailList.typefaceOriginRestsExplain }}</p>
                  <p v-if="detailList.wordage == 1">文字含义:<span v-html="detailList.typefaceMeaning"></span></p>

                </div>
                <!-- <p>审核意见: {{ patternList.examineRemark }}</p> -->
              </div>
            </div>

          </div>
          <div class="right">
            <a-list item-layout="horizontal" :data-source="elementList">
              <a-list-item slot="renderItem" slot-scope="item" class="item">
                <div style="width:50%;height:120px;background:#fff;padding:5px 0;">
                  <img :src="item.url ? item.url : 'https://img.bzhz.jnbygroup.com/cloth.png'" :alt="item.id"
                    style="cursor:pointer" onerror="this.src='https://img.bzhz.jnbygroup.com/cloth.png'"
                    @click="prevElementImg(item.url)" />
                </div>
                <div class="content">
                  <p>元素名称: {{ item.name }}</p>
                  <!-- <p>分类名称:{{item.categoryName}}</p> -->
                  <p>描述: {{ item.description }}</p>
                </div>
              </a-list-item>
            </a-list>
          </div>
        </div>
      </div>

      <a-modal :title="'易盾审核日志查询'" :visible="yidunvisible" width="60%" :footer="null" @cancel="resetHistory">
        <a-table bordered :columns="inncolumns" :rowKey="record => record.id" :data-source="historyList"
          :scroll="{ x: true }">
          <span slot="states" slot-scope="txt,record">
            <span v-if="record.yidunSuggestion == 0">通过</span>
            <span v-if="record.yidunSuggestion == 1">嫌疑</span>
            <span v-if="record.yidunSuggestion == 2">不通过</span>
            <span v-if="record.yidunSuggestion == -1">无</span>
          </span>
          <span slot="yidunExamineType" slot-scope="txt,record">
            <span v-if="record.yidunExamineType == 1">机审</span>
            <span v-if="record.yidunExamineType == 2">人审</span>
          </span>
          <template slot="url" slot-scope="txt, record">
            <div style="width:80px;height:80px">
              <img style="width: 100%;height: 100%;object-fit: scale-down;" :src="record.url" :alt="record.url">
            </div>
          </template>
        </a-table>
      </a-modal>
      <div v-show="showAll" style="display: flex;width:90%; border-bottom: 10px solid #fff;margin: auto;
      border-left: 10px solid #fff;
      border-right: 10px solid #fff;">
        <a-table bordered style="width:100%;text-align: center;" :columns="yiduncolumns" :rowKey="record => record.id"
          :data-source="dataSource" :scroll="{ x: true }">
          <template slot="title" slot-scope="currentPageData">
            <span style="font-size: 21px;">审核历史</span>
          </template>
          <span slot="examineStatus" slot-scope="txt,record">
            <span v-if="record.examineStatus == 10">通过</span>
            <span v-if="record.examineStatus == 20">不通过</span>
            <span v-if="record.examineStatus == 30">系统重置</span>
            <span v-if="record.examineStatus == 40">待定</span>
            <span v-if="record.examineStatus == 0">通过</span>
            <span v-if="record.examineStatus == 1">嫌疑</span>
            <span v-if="record.examineStatus == 2">不通过</span>
          </span>
          <span slot="type" slot-scope="txt,record">
            <span v-if="record.type == 10">法务</span>
            <span v-if="record.type == 20">易盾</span>
          </span>
          <span slot="yidunType" slot-scope="txt,record">
            <span v-if="record.yidunType == 1">机器结果</span>
            <span v-if="record.yidunType == 2">人审结果</span>
          </span>
          <template slot="url" slot-scope="txt, record" v-if="record.imageUrl">
            <div style="width:80px;height:80px">
              <img style="width: 100%;height: 100%;object-fit: scale-down;" :src="record.imageUrl" :alt="record.imageUrl">
            </div>
          </template>
          <!-- <template slot="action" slot-scope="txt, record">
            <a v-if="record.dataId" class="mr-10" @click="showyidunHistory(record)">
              查询
            </a>
          </template> -->
        </a-table>
      </div>
      <div v-show="showAll" style="display: flex;flex-direction: column;width:90%;margin:auto">
        <div id="skc">
          <p>关联SKC<span style="color: #f44336;font-size: 12px;">红色字体为该款已下架</span></p>
          <div v-if="!showSkc" style="text-align:center;margin:20px">
            暂无关联的SKC
          </div>
          <div style="display:flex;" id="table">
            <a-table bordered size="small" style="width:50%;" :columns="columns" :data-source="bandLeft"
              row-key="record => record._id" :row-class-name="record => record.unSale == '是' ? 'table-color' : ''"
              :pagination="false" :scroll="{ x: true }">
              <span slot="style" slot-scope="txt, record">
                {{ record.style }}{{ record.colorCode }}
              </span>
              <span slot="sampleCode" slot-scope="txt, record">
                {{ record.sampleCode }}{{ record.colorCode }}
              </span>
              <template slot="image" slot-scope="txt, record">

                <div style="display:flex;height:90px">
                  <img
                    :src="'https://bzhz.jnbygroup.com/jnbyimages/' + code + '/' + 'skc/thumbs/' + record.skcCode.replace('-ZJ', '').replace('-G', '') + '.png'"
                    onerror="this.src='https://img.bzhz.jnbygroup.com/cloth.png'" :alt="record.skcCode"
                    style="cursor:pointer;width: 48%;objectFit: scale-down"
                    @click="prevImg('https://bzhz.jnbygroup.com/jnbyimages/' + code + '/skc/' + record.skcCode.replace('-ZJ', '').replace('-G', '') + '.png', 'https://bzhz.jnbygroup.com/jnbyimages/back/' + code + '/skc/' + record.skcCode.replace('-ZJ', '').replace('-G', '') + '.png', 0)" />
                  <img
                    :src="'https://bzhz.jnbygroup.com/jnbyimages/back/' + code + '/' + 'skc/thumbs/' + record.skcCode.replace('-ZJ', '').replace('-G', '') + '.png'"
                    onerror="this.src='https://img.bzhz.jnbygroup.com/cloth.png'" :alt="record.skcCode"
                    style="cursor:pointer;margin-left:10px;width: 48%;objectFit: scale-down"
                    @click="prevImg('https://bzhz.jnbygroup.com/jnbyimages/' + code + '/skc/' + record.skcCode.replace('-ZJ', '').replace('-G', '') + '.png', 'https://bzhz.jnbygroup.com/jnbyimages/back/' + code + '/skc/' + record.skcCode.replace('-ZJ', '').replace('-G', '') + '.png', 1)" />
                </div>

              </template>
              <template slot="two" slot-scope="txt, record">
                {{ record.inQty - record.saleQty }}
              </template>
            </a-table>
            <a-table v-if="bandRight.length > 0" bordered size="small" style="width:50%;" :columns="columns"
              :data-source="bandRight" :pagination="false" row-key="record => record._id"
              :row-class-name="record => record.unSale == '是' ? 'table-color' : ''" :scroll="{ x: true }">
              <span slot="style" slot-scope="txt, record">
                {{ record.style }}{{ record.colorCode }}
              </span>
              <span slot="sampleCode" slot-scope="txt, record">
                {{ record.sampleCode }}{{ record.colorCode }}
              </span>
              <template slot="image" slot-scope="txt, record">

                <div style="display:flex;height:90px">
                  <img
                    :src="'https://bzhz.jnbygroup.com/jnbyimages/' + code + '/' + 'skc/thumbs/' + record.skcCode.replace('-ZJ', '').replace('-G', '') + '.png'"
                    onerror="this.src='https://img.bzhz.jnbygroup.com/cloth.png'" :alt="record.skcCode"
                    style="cursor:pointer;width: 48%;objectFit: scale-down"
                    @click="prevImg('https://bzhz.jnbygroup.com/jnbyimages/' + code + '/skc/' + record.skcCode.replace('-ZJ', '').replace('-G', '') + '.png', 'https://bzhz.jnbygroup.com/jnbyimages/back/' + code + '/skc/' + record.skcCode.replace('-ZJ', '').replace('-G', '') + '.png', 0)" />
                  <img
                    :src="'https://bzhz.jnbygroup.com/jnbyimages/back/' + code + '/' + 'skc/thumbs/' + record.skcCode.replace('-ZJ', '').replace('-G', '') + '.png'"
                    onerror="this.src='https://img.bzhz.jnbygroup.com/cloth.png'" :alt="record.skcCode"
                    style="cursor:pointer;margin-left:10px;width: 48%;objectFit: scale-down"
                    @click="prevImg('https://bzhz.jnbygroup.com/jnbyimages/' + code + '/skc/' + record.skcCode.replace('-ZJ', '').replace('-G', '') + '.png', 'https://bzhz.jnbygroup.com/jnbyimages/back/' + code + '/skc/' + record.skcCode.replace('-ZJ', '').replace('-G', '') + '.png', 1)" />
                </div>

              </template>
              <template slot="two" slot-scope="txt, record">
                {{ record.inQty - record.saleQty }}
              </template>
            </a-table>
          </div>
        </div>

      </div>
      <div v-show="showAll && key == 20" style="width:40%;margin: 10px auto;background:#fafafa;padding:10px">
        审核意见: {{ showExamineRemark }}
      </div>
      <a-modal title="审核意见" :visible="visible" @ok="pass()" @cancel="handleCancel">
        <a-textarea placeholder="请输入审核意见" allow-clear v-model="examineRemark" />
      </a-modal>
      <div style="margin: 10px auto;display:flex;justify-content: center;">
        <div v-show="(key == 10 || key == 0 || key == 40) && showAll" id="button"
          style="color: #ff4d4f;border:1px solid #ff4d4f" @click="showModal('20')">
          不通过
        </div>
        <div v-show="(key == 20 || key == 0 || key == 40) && showAll" id="button"
          style="color: #409eff;border:1px solid #409eff;" @click="showModal('10')">
          通过
        </div>
        <div v-show="(key != 40) && showAll" id="button" style="color: #409eff;border:1px solid #409eff;"
          @click="showModal('40')" v-if="showWait">
          待定
        </div>
        <!-- <div v-show="key != 10 && showAll" id="button" style="color: #409eff;border:1px solid #409eff;"
          @click="pass('10')">
          通过
        </div> -->
      </div>

      <div class="right-button" v-if="showButton" @click="next">
        <a-icon type="right" class="icon" />
      </div>
    </a-spin>
    <a-modal v-model="imgElementVisible" title="图片预览" @ok="imgElementVisible = false" :footer="null" width="60%"
      :mask="true">
      <div class="previmg">
        <img :src="elementImageUrl" />
      </div>

    </a-modal>

    <a-modal v-model="imgVisible" title="图片预览" @ok="imgVisible = false" :footer="null" width="60%">
      <a-carousel arrows ref="varousel2" id="ant-carousel">
        <div slot="prevArrow" slot-scope="props" class="custom-slick-arrow" style="left: 10px;zIndex: 1">
          <a-icon type="left-circle" />
        </div>
        <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px">
          <a-icon type="right-circle" />
        </div>
        <div class="previmg" v-for="(item, index) in prevImageUrl" :key="index" style="  display: flex;">
          <img :src="item" />
        </div>
      </a-carousel>
    </a-modal>
    <history v-if="showHis" :patternId="patternId" :ifTag="ifTag" @closeHistory="closeHistory"></history>
    <yidun v-if="showY" :patternId="patternId" @closeYidun="closeYidun"></yidun>
    <BigImg :visibleImgs="visibleImgs" :imgList="imgList" :goToIndex="goToIndex" @closeBig="closeBig"></BigImg>
    <submitHistory v-if="showSubmit" :patternCode="patternCode" :groupName="groupName" @closeSubmit="closeSubmit">
    </submitHistory>


  </div>
</template>
<script>
import { listMixin } from './listMixin'
import history from './history.vue'
import yidun from './yidun.vue'
import submitHistory from './submit.vue'
import BigImg from '@/views/box/components/UserMsg/bigImg'

const yiduncolumns = [
  {
    title: '图片',
    width:120,
    scopedSlots: { customRender: 'url' }
  },
  {
    title: '审核状态',
    width:100,
    scopedSlots: { customRender: 'examineStatus' }
  },
  {
    title: '分类',
    width:90,
    scopedSlots: { customRender: 'type' }
  },
  {
    title: '易盾分类',
    width:100,

    scopedSlots: { customRender: 'yidunType' }
  },
  {
    title: '审核人',
    width:100,

    dataIndex: 'name'
  },
  {
    title: '审核时间',
    width:200,

    dataIndex: 'examineDate'
  },
  {
    title: '审核意见',
    dataIndex: 'examineRemark'
  },
  // {
  //   title: '审核日志',
  //   width: 100,
  //   scopedSlots: { customRender: 'action' }
  // }
]
const inncolumns = [
  {
    title: '易盾建议',
    scopedSlots: { customRender: 'states' }
  },
  {
    title: '易盾检测说明',
    dataIndex: 'yidunExplain'
  },
  {
    title: '易盾审核类型',
    dataIndex: 'yidunExamineType',
    scopedSlots: { customRender: 'yidunExamineType' }

  },
  {
    title: '易盾审核时间',
    dataIndex: 'yidunExamineDate'
  }
]
const columns = [
  {
    title: '图片',
    width: '30%',
    scopedSlots: { customRender: 'image' }
  },
  {
    title: '款色号',
    width: 140,
    scopedSlots: { customRender: 'style' }
  },
  {
    title: '波段',
    width: 60,
    dataIndex: 'band'
  },
  {
    title: '样衣色号',
    width: 110,
    scopedSlots: { customRender: 'sampleCode' }
  },
  {
    title: '入库',
    dataIndex: 'inQty'
  },
  {
    title: '零售',
    dataIndex: 'saleQty'
  },
  {
    title: '库存',
    scopedSlots: { customRender: 'two' }
  }
]
export default {
  mixins: [listMixin],
  components: {
    history,
    yidun,
    BigImg,
    submitHistory
  },
  data() {
    return {
      columns,
      yiduncolumns,
      inncolumns,
      examineStatus: ['wait'],
      currentIndex: '',
      count1: 0,
      count2: 0,
      count3: 0,
      count4: 0,
      imgList: [],
      visibleImgs: false,
      goToIndex: 0,
    }
  },
  methods: {
    goLeft(index) {
      console.log(222);
      this.currentIndex = index
      this.$refs['varousel'].goTo(index - 1)
    },
    goRight(index) {
      console.log(111);
      this.currentIndex = index
      this.$refs['varousel'].goTo(index + 1)
    },
    closeBig(value) {
      this.visibleImgs = value
      setTimeout(() => {
        this.imgList = []
      }, 200)
    },
  }
}
</script>
<style scoped>
.top {
  background: #fafafa;
  border: 3px solid #fff;
}

.app {
  display: flex;
  flex-direction: column;
}

.exam /deep/.slick-disabled {
  color: transparent !important;
}

.app .left-button {
  width: 50px;
  height: 50px;
  cursor: pointer;
  line-height: 50px;
  text-align: center;
  border-radius: 50%;
  position: fixed;
  top: 45%;

  background: #fafafa;
  margin-left: -5px;
}

.app .left-button .icon {
  font-size: 24px;
  color: #bfbfbf;
}

.app .left-button:hover .icon {
  color: #08c;
}

.app .right-button .icon {
  font-size: 24px;
  color: #bfbfbf;
}

.app .right-button:hover .icon {
  color: #08c;
}

.app .right-button {
  width: 50px;
  height: 50px;
  cursor: pointer;
  line-height: 50px;
  text-align: center;
  border-radius: 50%;
  position: fixed;
  top: 45%;
  right: 6px;
  background: #fafafa;
}

#imgs {
  border: 10px solid #fff;
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 10px;
  margin: auto;
}

#imgs .left {
  width: 49.5%;
  height: 100%;
  object-fit: scale-down;
}

#imgs .left img {
  width: 100%;
  height: 100%;
  object-fit: scale-down;
}

#patternText {
  padding: 10px 20px;
}

#patternText p {
  margin-bottom: 5px;
}

#imgs .right {
  display: flex;
  width: 49.5%;
  flex-direction: column;
}

#imgs .right .item {
  display: flex;
  background-color: #fafafa;
  justify-content: space-between;
  padding: 10px;
  margin-bottom: 5px;
  border: 3px solid #fff;
}

#imgs .right .item .content {
  width: 48%;
  margin-left: 2%;
}

#imgs .right .item .content p {
  font-weight: 500;
  word-break: break-all;
}

#imgs .right img {
  width: 100%;
  height: 100%;
  object-fit: scale-down;
}

#button {
  margin: 0px 20px;
  text-align: center;
  width: 100px;
  height: 40px;
  line-height: 40px;
  border-radius: 20px;
}

#button:hover {
  cursor: pointer;
  background: aliceblue;
}

#skc {
  border-bottom: 10px solid #fff;
  border-left: 10px solid #fff;
  border-right: 10px solid #fff;
  width: 100%;
  margin: auto;
}

#skc p {
  text-align: center;
  font-size: 21px;
  margin: 5px auto;
}

#skc .skcImgs img {
  width: 100%;
  height: 100%;
  object-fit: scale-down;
}

.ant-list-item {
  border: none;
}

.previmg {
  display: flex !important;
  justify-content: center;
  align-items: center;
}

.previmg img {
  width: 500px;
}

.ant-carousel>>>.custom-slick-arrow {
  width: 25px;
  height: 25px;
  font-size: 25px;
  color: rgba(31, 45, 61, 0.9);
  /* background-color: rgba(31, 45, 61, 0.5); */
  opacity: 0.3;
}

.ant-carousel>>>.custom-slick-arrow:before {
  display: none;
}

.ant-carousel>>>.custom-slick-arrow:hover {
  opacity: 0.5;
}

.ant-carousel>>>.slick-slide h3 {
  color: #fff;
}

.ant-menu-horizontal>.ant-menu-item,
.ant-menu-horizontal>.ant-menu-submenu {
  background: #fafafa;
  width: 150px;
  border-radius: 10px;
  text-align: center;
}

.ant-menu {
  background: transparent;
}

.ant-menu-horizontal {
  border-bottom: none;
}

.ant-menu-horizontal>.ant-menu-item:hover,
.ant-menu-horizontal>.ant-menu-submenu:hover,
.ant-menu-horizontal>.ant-menu-item-active,
.ant-menu-horizontal>.ant-menu-submenu-active,
.ant-menu-horizontal>.ant-menu-item-open,
.ant-menu-horizontal>.ant-menu-submenu-open,
.ant-menu-horizontal>.ant-menu-item-selected,
.ant-menu-horizontal>.ant-menu-submenu-selected {
  background: #faebd770;
}

#pattern {
  padding-bottom: 12px;
  width: 60%;
  margin: auto;
  display: flex;
  justify-content: space-between;
}

#imgicon {
  width: 25px;
  height: 25px;
  font-size: 25px;
  color: rgba(31, 45, 61, 0.9);
  opacity: 0.3;
  z-index: 1000;
}</style>
<style>#table .ant-table {
  font-size: 14px;
}

.table-color {
  color: #f5222d;
}</style>

